<html>
	<head>
		<title>Outfitter User's Manual</title>
		<style type="text/css"> a:link { color: #ffe040; }
	a:visited { color: #ffe040; }
	a:hover { color: white; }
	a:active { color: purple; }
	body { background-image: url('Images/background.jpg'); background-repeat: repeat-xy; color: #ffe040; }
	h2 { color: white; }
	p { font-size: medium; font-weight: bold; margin-left: 3em; }
	div { font-size: medium; font-weight: bold; padding-left: 3em; }
	ul { margin-left: 5em; }
	li { font-size: medium; font-weight: bold; }
	pre { margin-left: 7em; color: white; }
	.title { font-size: xx-large; font-weight: bold; color: white; }
	.note { color: white; margin-left: 2em; }
	.GameFontNormal { font-size: medium; font-weight: bold; color: #ffe040; }
	.GameFontHighlight { font-size: medium; font-weight: bold; color: white; }
	.Cmd { font-family: courier; font-size: medium; font-weight: normal; color: white; }
	</style>
	</head>
	<body>
		<div class="title"><img style="vertical-align: middle" src="Images/OutfitterIcon.jpg" alt="">Outfitter Instructions</div>
		<h2>Contents</h2>
		<ul>
			<li>
				<a href="#Install">Installing Outfitter</a>
			<li>
				<a href="#Access">Accessing Outfitter</a>
			<li>
				<a href="#Categories">Outfit categories and ready-made outfits</a>
			<li>
				<a href="#Create">Creating an outfit</a>
			<li>
				<a href="#Update">Updating an outfit</a>
			<li>
				<a href="#Minimap">The minimap button</a>
			<li>
				<a href="#Quickslots">QuickSlots</a>
			<li>
				<a href="#Commands">Macro commands</a>
			<li>
				<a href="#Scripts">Scripts</a>
			<li>
				<a href="#KeyBindings">Key Bindings</a>
			<li><a href="#SampleScripts">Sample Scripts</a>
		</ul>
		<h2><a name="Install">Installing Outfitter</a></h2>
		<p>Outfitter is installed just like any other addon. If World of Warcraft is 
			running you should exit from the game before installing. Extract the contents 
			of the Outfitter.zip file and then copy the resulting Outfitter folder to your 
			World of Warcraft's Addons folder located inside the Interface folder.</p>
		<p><span class="GameFontHighlight">Windows users:</span>
			The Addons folder can normally be found at
			<span class="Cmd">C:\Program 
			Files\World of Warcraft\Interface\Addons</span></p>
		<p><span class="GameFontHighlight">MacOS users:</span>The Addons folder can 
			normally be found inside the Interface folder which is located inside the World 
			of Warcraft application folder</p>
		<p>IMPORTANT: Depending on your unzipping application, you may end up with the 
			addon folder inside another folder. Look inside the Outfitter folder and verify 
			that there's a file named Outfitter.toc. If you don't see this file and see 
			another folder instead, open that folder and look for the file. The folder 
			containing the .toc file is the one which should be copied to your World of 
			Warcraft addons folder.</p>
		<p>The addon is now installed and you can now launch World of Warcraft.</p>
		<h2><a name="Access">Accessing Outfitter</a></h2>
		<p>To open Outfitter simply open World of Warcrafts character window (usually the 
			'c' key on your keyboard. You can open Outfitter from the Character window by 
			click the button with a robe icon in the top right corner of the window.</p>
		<div align="center"><img src="Images/OutfitterUI.jpg" alt=""></div>
		<h2><a name="Categories">Outfit categories and ready-made outfits</a></h2>
		<p>One of the first things you will notice is that Outfitter has created several 
			outfits for you and that these outfits are in categories named Complete 
			Wardrobes, Mix-n-match, Accessories, and Special Occassions.</p>
		<p><span class="GameFontHighlight">Complete Wardrobes</span>
			are outfits which contain an item for every slot of your inventory. Whenever 
			you wear a complete wardrobe you will replace any other outfits you're wearing 
			at the time. The first time you use Outfitter it will create two complete 
			wardrobes for you. The Normal wardrobe is whatever gear you happened to be 
			wearing when Outfitter was first run. The Birthday Suit outfit is a naked 
			outfit which will remove all of your gear when you wear it.</p>
		<p><span class="GameFontHighlight">Mix-n-match</span>
			outfits on the other hand don't have items in every slot. These outfits are 
			used to overlay special sets of items, such as Fire Resist gear or PvP items, 
			over a complete wardrobe. Any time you select a Mix-n-match outfit you will 
			replace all other outfits you're wearing, except for the selected Complete 
			Wardrobe which will act as a base outfit for the overlay. The first time you 
			use Outfitter it will attempt to create a set of resistance gear (Fire, Nature, 
			etc.) for you. If you don't have any items which give you a particular 
			resistance then Outfitter won't create that outfit automatically.</p>
		<p><span class="GameFontHighlight">Accessories</span>, like Mix-n-match, are also 
			only partial outfits. The difference is that you can combine as many accessory 
			outfits as you like. These outfits can be used for equipping special items such 
			as Jumper Cables, Lei of Lilies, fishing poles, or other items which you don't 
			normally have as part of another outfit. The first time you use Outfitter it 
			will search your bags for tradeskill items, such as fishing poles, gloves with 
			herbalism, mining or skinning enchants, etc. and create Accessory outfits for 
			those.</p>
		<p>The last category is
			<span class="GameFontHighlight">Special Occassion</span>
			outfits which are worn automatically for you at the appropriate time. There are 
			several of these outfits, some are created for every class and others are only 
			created for specific classes</p>
		<p>The
			<span class="GameFontHighlight">Argent Dawn</span>
			outfit will be worn whenever you're in the plaguelands, Scholomance or 
			Stratholme and will automatically be setup with your Argent Dawn trinket if you 
			have one.</p>
		<p>The
			<span class="GameFontHighlight">Riding</span>
			outfit will be worn whenever you are mounted and will automatically be setup 
			with your Carrot on a Stick, boots with Mithril Spurs, and gloves with the 
			Riding Skill enchantment if you have those. Note that by default the riding 
			outfit is setup so that it won't equip when you are in a battleground. You can 
			change this setting using the menu to the right of the outfit.</p>
		<p>The
			<span class="GameFontHighlight">Dining</span>
			outfit will be worn whenever you start eating or drinking. This outfit is 
			initially "transparent" (meaning it has no inventory slots enabled) but can be 
			edited to include items which boost your spirit or health and mana regen in 
			order to lower your down time. Choosing items for this outfit can be tricky 
			though since you don't want to swap in items which reduce your stamina or 
			intellect.</p>
		<p>The
			<span class="GameFontHighlight">Battlegrounds</span>
			outfit will be worn whenever you're in one of the three battlegrounds and can 
			be used to automatically equip your PvP gear.</p>
		<p>There are also class-specific outfits for priests (shadowform), rogues 
			(stealth), warriors (all three stances), and druids (all four shapeshift 
			forms). These outfits are set to transparent by default, so they have no 
			effect.</p>
		<p>Any of the Special Occassion outfits can be disabled by using the menu to the 
			right of the outfit. This is useful if you only temporarily want to prevent 
			that outfit from auto-equipping.</p>
		<h2><a name="Create">Creating an outfit</a></h2>
		<p>To create an outfit click the New Outfit button at the bottom of the window. 
			This will open the New Outfit window where you can name your new outfit and 
			specify how you want it initially setup.</p>
		<div align="center"><img src="Images/NewOutfit.jpg" alt="New Outfit UI"></div>
		<p>By default the Optimize menu will be set to use current outfit. This will create 
			the new outfit as a Complete Wardrobe using whatever items you currently have 
			equipped.</p>
		<p>You may choose Create Empty Outfit which will create an outfit with no slots 
			enabled.</p>
		<p>If you want to have Outfitter generate an outfit for you which maximizes some 
			attribute, you can choose that attribute from the various sub-menus of the 
			Optimize menu. You can maximize stamina, nature resistance, spell damage, and 
			many other attributes using this feature. Outfitter will scan your bags and 
			inventory and choose an item for each slot which has the maximum value for that 
			attribute. If you don't have any items for a slot which contain that attribute 
			then that slot will not be enabled in your new outfit.</p>
		<h2><a name="Update">Updating an outfit</a></h2>
		<p>You can change the contents of an outfit at any time by opening Outfitter and 
			selecting the outfit from your list of outfits. The selected outfit will equip 
			and the enabled slots for that outfit will have checkmarks in them. Just equip 
			an item and it will be added to the selected outfit. If you no longer want that 
			outfit to include a particular slot just uncheck the box for that slot.</p>
		<p>When an outfit is selected you will also see two new buttons at the top of your 
			character window "Enable all" and "Enable none" These buttons can be used to 
			quickly enable all item slots or disable all item slots to make it easier to 
			create your outfit.</p>
		<h2><a name="Minimap">The minimap button</a></h2>
		<p>The minimap button will initially be located at the center of the left side of 
			your minimap. If you are using other addons which place buttons around the 
			minimap you may have to temporarily move them out of the way in order to see 
			Outfitters button.</p>
		<div align="center"><img src="Images/Minimap.jpg" alt=""></div>
		<p>To change the position of Outfitter button just drag it to where you'd like it. 
			This position will be remembered and set for you each time you start World of 
			Warcraft.</p>
		<p>To bring up Outfitters minimap menu click the button. From here you can open the 
			Outfitter UI in order to edit outfits or you can quickly select an outfit to 
			wear.</p>
		<h2><a name="Quickslots">QuickSlots</a></h2>
		<p>QuickSlots are automatically added to your character window for each item slot. 
			They allow you to quickly find items which go into that slot without having to 
			dig through all your bags. To access the QuickSlot just click a slot in your 
			character window. A row of inventory slots will appear containing every item 
			you have which can go into that slot. An empty slot is also provided so you can 
			quickly unequip an item without having to open your bags.</p>
		<div align="center"><img src="Images/QuickSlots.jpg" alt="QuickSlots UI"></div>
		<h2><a name="Commands">Commands</a></h2>
		<p>Commands to equip or unequip outfits can be included in macros. Outfitter 
			supports these commands:</p>
		<p>
			<span class="Cmd">/outfitter wear outfitname</span>
			Equips the outfit named outfitname<br>
			<span class="Cmd">/outfitter unwear outfitname</span>
			Unequips the outfit named outfitname<br>
			<span class="Cmd">/outfitter toggle outfitname</span>
			Toggles the outfit named outfitname (if it is currently equipped it's removed, 
			otherwise it's equipped<br>
		</p>
		<h2><a name="Scripts">Scripts</a></h2>
		<p>You can create custom behaviors for outfits by attaching scripts to them.  See
		<a href="http://www.lua.org">lua.org</a> for more information on the LUA language used by World of
		Warcraft for scripting and see <a href="http://www.wowwiki.com">WoWiki</a> for more information on
		the Warcraft interface</p>
		<p>
			In addition to the normal events provided by WoW, Outfitter also provides some useful
			custom events to help in writing scripts.</p>
		
		<h3>General Events</h3>
		<span class="Cmd">GAMETOOLTIP_SHOW</span> Event fires whenever the game tooltip is shown<br />
		<span class="Cmd">GAMETOOLTIP_HIDE</span> Event fires whenever the game tooltip is hidden<br />
		<span class="Cmd">TIMER</span> Event which fires once every second -- useful for outfits which can't use other events and need to periodically poll for their state<br />
		<span class="Cmd">DINING and NO_DINING</span> Fired when a player starts and stops eating<br />
		<h3>Warrior Events</h3>
		<span class="Cmd">BATTLE_STANCE and NO_BATTLE_STANCE</span> Fired when a warrior enters and leaves Battle Stance<br />
		<span class="Cmd">DEFENSIVE_STANCE and NO_DEFENSIVE_STANCE</span> Fired when a warrior enters and leaves Defensive Stance<br />
		<span class="Cmd">BERSERKER_STANCE and NO_BERSERKER_STANCE</span> Fired when a warrior enters and leaves Berserker Stance<br />
		<h3>Druid Events</h3>
		<span class="Cmd">BEAR_FORM and NO_BEAR_FORM</span> Fired when a druid enters and leaves Bear Form<br />
		<span class="Cmd">CAT_FORM and NO_CAT_FORM</span> Fired when a druid enters and leaves Cat Form<br />
		<span class="Cmd">AQUATIC_FORM and NO_AQUATIC_FORM</span> Fired when a druid enters and leaves Aquatic Form<br />
		<span class="Cmd">TRAVEL_FORM and NO_TRAVEL_FORM</span> Fired when a druid enters and leaves Travel Form<br />
		<span class="Cmd">MOONKIN_FORM and NO_MOONKIN_FORM</span> Fired when a druid enters and leaves Moonkin Form<br />
		<span class="Cmd">TREE_FORM and NO_TREE_FORM</span> Fired when a druid enters and leaves Tree Form<br />
		<span class="Cmd">STEALTH and NO_STEALTH</span> Fired when a druid or rogue enters and leaves stealth/prowl<br />
		<h3>Rogue Events</h3>
		<span class="Cmd">STEALTH and NO_STEALTH</span> Fired when a druid or rogue enters and leaves stealth/prowl<br />
		<h3>Priest Events</h3>
		<span class="Cmd">SHADOWFORM and NO_SHADOWFORM</span> Fired when a priest enters and leaves Shadowform<br />
		<h3>Shaman Events</h3>
		<span class="Cmd">GHOST_WOLF and NO_GHOST_WOLF</span> Fired when a shaman enters and leaves Ghost Wolf<br />
		<h3>Hunter Events</h3>
		<span class="Cmd">MONKEY_ASPECT and NO_MONKEY_ASPECT</span> Fired when a hunter enters and leaves Aspect of the Monkey<br />
		<span class="Cmd">HAWK_ASPECT and NO_HAWK_ASPECT</span> Fired when a hunter enters and leaves Aspect of the Hawk<br />
		<span class="Cmd">CHEETAH_ASPECT and NO_CHEETAH_ASPECT</span> Fired when a hunter enters and leaves Aspect of the Cheetah<br />
		<span class="Cmd">PACK_ASPECT and NO_PACK_ASPECT</span> Fired when a hunter enters and leaves Aspect of the Pack<br />
		<span class="Cmd">BEAST_ASPECT and NO_BEAST_ASPECT</span> Fired when a hunter enters and leaves Aspect of the Beast<br />
		<span class="Cmd">WILD_ASPECT and NO_WILD_ASPECT</span> Fired when a hunter enters and leaves Aspect of the Wild<br />
		<span class="Cmd">VIPER_ASPECT and NO_VIPER_ASPECT</span> Fired when a hunter enters and leaves Aspect of the Viper<br />
		<span class="Cmd">FEIGN_DEATH and FEIGN_DEATH</span> Fired when a hunter enters and leaves Feign Death<br />
		<h3>Mage Events</h3>
		<span class="Cmd">EVOCATE and NO_EVOCATE</span> Fired when a mage begins and ends Evocate<br />
		<h3>Special Variables</h3>
		<span class="Cmd">isEquipped</span> Set to true if the outfit is currently equipped<br />
		<span class="Cmd">didEquip</span> Set to true if your script is the reason the outfit is currently equipped<br />
		<span class="Cmd">didUnequip</span> Set to true if your script is the reason the outfit is currently unequipped<br />
		<span class="Cmd">time</span> The current system time as returned by GetTime()<br />
		<span class="Cmd">setting</span> Current values of the script's $SETTING inputs<br />
		<span class="Cmd">equip</span> Tells Outfitter what you want done with the outfit after the script is run.  Set it to true to equip the outfit, set it to false to unequip the outfit, or don't set it (or set it to nil) to leave the outfit as-is<br />
		<span class="Cmd">layer</span> Tells Outfitter which layer (if any) to tag the outfit with.  Other outfits with the same layer tag will be equipped adjacent to this outfit in the stack<br />
		<span class="Cmd">delay</span> Tells Outfitter How many seconds to wait before equipping or unequipping the outfit<br />
		
		<h2><a name="KeyBindings">Key Bindings</a></h2>
		<p>Outfits can be attached to a key so that they can be equipped or removed using a 
			key press. Outfitter supports up to 10 outfits being attached to keys. To 
			attach an outfit to a key on your keyboard, do the following:</p>
		<p>First, use the menu next to the outfit to choose which of the 10 key bindings 
			you want to use for your outfit.</p>
		<p>Next open World of Warcraft's Key Binding settings window and scroll down to the 
			Outfitter section. In that section you will see the 10 key binding outfits 
			listed and you can associate a key combination with that outfit.</p>
		<h2><a name="SampleScripts">Sample Scripts</a></h2>
		<p>Detect Spellsurge proc and equip an alternate weapon</p>
		<pre>-- $EVENTS PLAYER_ENTERING_WORLD CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS TIMER
-- $DESC Equips the outfit when the players own Spellsurge procs, then unequips it 50 seconds later

if event == "PLAYER_ENTERING_WORLD" then
    outfit.spellsurgeEnd = nil
elseif event == "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS" then
    if arg1 == "You gain 10 Mana from Spellsurge."
    and not outfit.spellsurgeEnd then
        outfit.spellsurgeEnd = time + 50
        equip = true
    end
elseif event == "TIMER" then
    if outfit.spellsurgeEnd 
    and time >= outfit.spellsurgeEnd then
        outfit.spellsurgeEnd = nil
        equip = false
    end
end</pre>
		<p>Equip on specific spellcast</p>
		<pre>-- $EVENTS UNIT_SPELLCAST_START
-- $DESC Equips when you start casting the specified spell, unequips when you cast something else
-- $SETTING spell={Type="String", Label="Spell"}

if arg1 ~= "player" then return end

if strlower(arg2) == strlower(setting.spell) then
    equip = true
else
    equip = false
end</pre>
		<p>Equips when mana is low, then unequips when mana returns (by RaeVanMorlock)</p>
		<pre>-- $EVENTS UNIT_MANA
-- $DESC Equips the outfit when your mana drops below a certain percentage. Unequips when it reaches a certain percentage.

-- $SETTING ManaEquip={Label="Equip below", Type="Number", Suffix="% mana"}
-- $SETTING ManaUnequip={Label="Unquip above", Type="Number", Suffix="% mana"}

if arg1 ~= "player" then return end

local manaPercent = 100 * UnitMana(arg1) / UnitManaMax(arg1)

if manaPercent < setting.ManaEquip then
    equip = true
elseif didEquip and manaPercent > setting.ManaUnequip then
    equip = false
end</pre>
		<p>Unequips other outfits when this outfit is equipped, then puts them back on when it's unequipped</p>
		<pre>-- $EVENTS OUTFIT_EQUIPPED OUTFIT_UNEQUIPPED
-- $SETTING Outfits="StringTable"
-- $DESC Unequips the listed outfits when this outfit is equipped, then puts them back on when it's unequipped

if event == "OUTFIT_EQUIPPED" then
    for _, name in ipairs(settings.Outfits) do
        Outfitter:RemoveOutfit(Outfitter:FindOutfit(name))
    end
    return
elseif event == "OUTFIT_UNEQUIPPED" then
    for _, name in ipairs(settings.Outfits) do
        Outfitter:WearOutfitByName(name)
    end
    return
end</pre>
	</body>
</html>
